const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      //凡是以/api开头的请求,都会被内置的express服务器转发到真实服务器 http://waimai.yantianfeng.com/
      //不是以/api开头的请求,会报错404
      '/api': {
        target: 'http://waimai.yantianfeng.com/',
        changeOrigin: true,
        pathRewrite: {}
      }
    }
  }
})
